package com.itheima.homework.Date类;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class Demo4 {
    public static void main(String[] args) throws ParseException {
        String time="2020-10-3";
        SimpleDateFormat sdf=new SimpleDateFormat("YYYY-MM-dd");
        Date parse = sdf.parse(time);
        long time1 = parse.getTime();
        String format = sdf.format(time1);
        System.out.println(format);
    }
}
